The present invention relates to electronic trading systems for trading stocks, bonds, futures, options and other financial instruments as well as betting and e-gaming, and in particular to methods, computer readable mediums and computer program products for such systems.
During the last decade, almost all the world's exchanges and marketplaces have introduced electronic trading systems. These systems either replace the traditional trading floors or are used as complements to them. Today a large number of exchanges throughout the world utilize electronic trading to trade stocks, bonds, futures, options and other financial instruments. These electronic exchanges generally include three basic components, namely server computers (host), communication servers, and the exchanges participants computers (client). The host constitutes, so to speak, the heart of the electronic trading system. The hosts operations includes, for example, order-matching, maintaining order books and positions or price information. Participants, e.g., traders, are capable of communicating with the host by means of high speed data lines, high speed communications servers and the Internet. Thus, the traders can participate in the market by means of the clients communicating with the host.
In order to secure system availability, the exchange's system often uses two servers placed in two geographically different spots interconnected via a network. One of the servers is considered being the primary server and the other consequently as the secondary. The system will be operational with only one server acting as primary, but will then, of course, not be redundant. The primary server will accept incoming messages, store them to disk (i.e., a disk unit) in a log file and replicate the message to the secondary node or server. The two servers then perform the same business logic procedure based on the incoming message. This results in the two servers being synchronized and having the same application state, i.e., each transaction has the same state with respect to, for example, price or volume of a stock. If the primary server fails for some reason, the secondary server is accordingly able to take over and take the role as primary node and accept incoming messages. On the other hand, if the secondary server fails for some reason, the primary server just continuous to operate.
In order to be able to access data in such a system, such as user data (e.g., data regarding e-mail address and telephone number of a specific user), or instrument data (e.g., data regarding traded instruments), in a structured and efficient way, such data is stored in SQL databases connected to the servers. This data is used by the business logic of the servers during the processing of incoming messages i.e., transactions. When a server receives an updating message, i.e., a message containing a number of updating instructions (e.g., add a new user or add a new instrument), the database is updated according to the instructions in the updating message. The updating operations, i.e., the new information, is not permanently stored in the database until they are committed or confirmed, i.e., a command making all data modifications performed since the start of the updating operation a permanent part of the database. If the database or a server should fail for some reason before an operation, i.e., an updating, has been committed, the updated information will thus be lost since it not has become a permanent part of the database yet. Consequently, a large number of committing operations will have to performed in order to assure reliable in service, or in other words, to assure that no updating data is lost in case of failure of the database or the server. Each committing operation is time-consuming and puts a load on the databases and the servers. If a large number of updating messages is received and/or updating messages containing a large number of updating operations, the required committing operations may introduce significant time delays and/or significant load on the database and thus the performance of the system may be periodically degraded.
Thus, there is need of an improved method for a trading system.